package com.qingcloud.api.dcengine.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

/**
 * 分页结果包装对象
 */
@Getter
@Setter
@AllArgsConstructor
public class TablePageDTO<T> implements Serializable {

    public TablePageDTO() {
        this.recordsTotal = 0L;
        this.data = Collections.emptyList();
    }

    @ApiModelProperty(value = "数据总条数", example = "1")
    private Long recordsTotal;

    @ApiModelProperty(value = "数据列表")
    private List<T> data;

}
